<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>

<c:set var="module" value="specification"/>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
		<form action="${ctx }/admin/specification/save?id=${n.id }" id="detail-form" class="form-horizontal" method="post">
			<div class="form-group">
                 <label class="col-sm-2 control-label">产品</label>
                 <div class="col-sm-10">
<%--                  	<input type="text" class="form-control" name="product.id" value="${n.product.id }"> --%>
                 	<input type="hidden" id="product-id" name="product.id" value="${p.id }" class="form-control">
                 	<input type="text" disabled="disabled" value="${p.name }" class="form-control"/>
                 </div>
             </div>	
             <div class="form-group">
                 <label class="col-sm-2 control-label">达达订货编码</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="ogCode" value="${n.ogCode }">
                 </div>
             </div>
			<div class="form-group">
                 <label class="col-sm-2 control-label">工厂编码</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="factoryCode" value="${n.factoryCode }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">规格1</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="spec1" value="${n.spec1 }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">规格2</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="spec2" value="${n.spec2 }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">销售价</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="sellingPrice" value="${n.sellingPrice }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">重量</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="weight" value="${n.weight }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">体积</label>
                 <div class="col-sm-10">
                 	<input type="text" class="form-control" name="size" value="${n.size }">
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">库存</label>
                 <div class="col-sm-10">
                 	<input type="number" class="form-control" name="stock" value="${n.stock }">
                 </div>
             </div>	
	        	<div class="form-group">
	                 <label class="col-sm-2 control-label">商品规格多图</label>
	                 <div class="col-sm-10">
			            <input type="hidden" name="images" id="images" value="${n.images }" />
	                 	<div class="my-images" single="false" images="${n.images }" id="image2" field="images">
	                 	</div>
	                 </div>
	             </div>
		</form>
</div>

<%@include file="/common/foot.jsp" %>
<script type="text/javascript">
$(document).ready(function() {
	init_images('image2');
});
</script>
</body>
</html>
